	{load href="__LIBS__/jquery/jquery-1.11.2.min.js" /}
	{load href="__BASE__/css/group.css" /} 
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="viewFramework-sidebar-manage ng-scope">
				<div class="modal-header">
					<button type="button" class="close">×</button>
					<h5 class="modal-title ng-binding">用户权限授权</h5>
				</div>
				<div class="modal-body">
					<div class="sidebar-config-title ng-binding">
						已拥有权限分组:
					</div>
					<form id="GroupForm" action="{:url('Member/groupAuth')}" method="POST">
					<input type="hidden" id="uid" value="{$uid}">
						{notempty name="userGroup"}
							<div class="sidebar-item-list sidebar-item-list-picked clearfix">
								 {foreach name="userGroup" item="vo" key="k" }
								   <div class="sidebar-item-wrap ng-scope">
										<div class="sidebar-item">
											<span class="sidebar-item-icon">&nbsp;</span>
											</span><span class="sidebar-item-text ng-binding">{$vo.title}&nbsp;</span><span class="sidebar-item-opt-icon icon-no"></span>
										</div>
										<input type="hidden" class="accessGroupDel" name="group_access" value="{$uid},{$vo.group_id}">
									</div>
								{/foreach}
							</div>
						{else /}
							<div class="sidebar-item-list sidebar-item-list-picked clearfix">
							</div>
							<div class="clear10"></div>
						{/notempty}
					</form>
					<div class="sidebar-config-gap">
					</div>
					<div class="sidebar-config-title ng-binding">
						可添加权限分组:
					</div>
					<div class="sidebar-item-list sidebar-item-list-picked-2 clearfix">
						 {foreach name="authgroup" item="vo" key="k" }
						    <!-- ngRepeat: item in allItems track by $index -->
							<div class="sidebar-item-wrap ng-scope">
								<div class="sidebar-item" title="{$vo.description}">
									<span class="sidebar-item-icon">&nbsp;</span>
									</span><span class="sidebar-item-text ng-binding">{$vo.title}&nbsp;</span><span class="sidebar-item-opt-icon icon-add"></span>
								</div>
								<input type="hidden" name="group_access" value="{$uid},{$vo.id}">
								
							</div>
							<!-- end ngRepeat: item in allItems track by $index -->
						{/foreach}
					</div>
				</div>
				<div class="modal-footer">
					<!-- ngIf: pickedItems.length > 0 -->
					<button class="btn btn-primary ng-scope ng-binding btnOK">确定</button>
					<!-- end ngIf: pickedItems.length > 0 -->
					<!-- ngIf: pickedItems.length == 0 -->
					<button class="btn btn-default ng-binding btn-close btnCancel">取消</button>
				</div>
			</div>
		</div>
	</div>
<script type="text/javascript">
	$(function(){
			var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
			parent.layer.iframeAuto(index);
			parent.layer.style(index, {
				top: '25%'
			});
		 
		$('.sidebar-item-list').on('click', ".icon-add",function(event) {
			var html = $(this).addClass('icon-no').removeClass('icon-add').parents('.sidebar-item-wrap');
			html.appendTo('.sidebar-item-list-picked');
			parent.layer.iframeAuto(index);
		}).on('click',".icon-no", function(event) {
			var html = $(this).addClass('icon-add').removeClass('icon-no').parents('.sidebar-item-wrap');
			html.appendTo('.sidebar-item-list-picked-2');
			parent.layer.iframeAuto(index);
		})
	})

</script>

